package org.linys.service.dict;

import java.util.List;

import org.linys.dao.dict.DictionaryDAO;
import org.linys.model.dict.Dictionary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DictionaryServ {
	private DictionaryDAO dictionaryDAO;
	
	
	public DictionaryDAO getDictionaryDAO() {
		return dictionaryDAO;
	}

	@Autowired
	public void setDictionaryDAO(DictionaryDAO dictionaryDAO) {
		this.dictionaryDAO = dictionaryDAO;
	}



	public void update(Dictionary dictionary) {
		 dictionaryDAO.update(dictionary);
	}
	
	public Integer insert(Dictionary dictionary) {
		return dictionaryDAO.insert(dictionary);
	}

	public int count(Dictionary dictionary) {
		return dictionaryDAO.count(dictionary);
	}

	public int delete(Dictionary dictionary) {
		return dictionaryDAO.delete(dictionary);
	}

	public List<Dictionary> list(Dictionary dictionary, Integer start,
			Integer rows) {
		return dictionaryDAO.list(dictionary,start,rows);
	}

	public int countChoose(Dictionary dictionary) {
		return dictionaryDAO.countChoose(dictionary);
	}

	public List<Dictionary> viewChoose(Dictionary dictionary, Integer start,
			Integer rows) {
		return dictionaryDAO.viewChoose(dictionary,start,rows);
	}

	public Dictionary getByID(Dictionary dictionary) {
		return dictionaryDAO.getByID(dictionary);
	}
}
